package org.example.auth.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.example.misc.model.IResultCode;

public enum AuthExceptionEnum implements IResultCode {
    ROLE_EXISTED("11000", "权限已存在"),
    USER_LOGIN_NAME_EXISTED("11001", "用户名重复"),
    AUTHORITY_EXISTED("11002", "路由【%s】已存在"),
    AUTHORITY_NOT_EXISTED("11002", "路由不存在"),
    ;
    /**
     * 状态码
     */
    final String code;
    /**
     * 消息内容
     */
    final String msg;

    AuthExceptionEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
